def getMenuOption(debug = False):
    if debug:
        print "getMenuOption Function"
    validInput = False
    while not validInput:
        option = raw_input("> ")
        option = option.lower()
        if option == "1":
            validInput = True
        elif option == "2":
            validInput = True
        elif option == "3":
            validInput = True
        elif option == "o" or option == "options":
            option = "o"
            validInput = True
        elif (option == "exit" or
              option == "x" or
              option == "quit" or
              option == "q"):
                  option = "exit"
                  validInput = True
        else:
            print "please type a valid option"
            validInput = False
    if debug:
        print "Option is:", option
    return option
            
def getWord(prompt, debug = False):
    if debug:
        print "getWord Function", prompt
    validInput = False
    while not validInput:
        option = raw_input(prompt)
        validInput = True
        if option == "":
            print "please type a word"
            validInput = False
        elif isSwear(option, debug):
            print "Don't say such naughty things!"          
            validInput = False
    if debug:
        print "Option:", option 
    return option
    
def getBody(prompt, debug = False):
    if debug:
        print "getBody Function", prompt
    validInput = False
    while not validInput:
        option = raw_input(prompt)
        bodylist = ["head",
                    "nose",
                    "ear",
                    "mouth",
                    "stomache", 
                    "foot", 
                    "toe", 
                    "leg", 
                    "arm", 
                    "hand",
                    "brain",
                    "frontal bone",
                    "parietal bone",
                    "temporal bone",
                    "occipital bone",
                    "sphenoid bone",
                    "ethmoid bone",
                    "mandible",
                    "maxilla",
                    "palatine bone", 
                    "zygomatic bone",
                    "nasal bone",
                    "lacrimal bone", 
                    "vomer",
                    "inferior nasal conchae", 
                    "Ear Bones",
                    "malleus",
                    "incus",
                    "stapes",
                    "Throat Bone", 
                    "hyoid bone",
                    "Shoulder Bones", 
                    "scapula or shoulder blade", 
                    "Chest Bones",
                    "sternum",
                    "ribs",
                    "Vertebral Bones", 
                    "cervical vertebrae", 
                    "thoracic vertebrae",
                    "lumbar vertebrae",
                    "sacral vertebrae", 
                    "coccygeal vertebrae", 
                    "Humerus",
                    "radius",
                    "ulna",
                    "Hand Bones", 
                    "Carpal (wrist) bones",
                    "scaphoid bone",
                    "lunate bone",
                    "triquetral bone", 
                    "pisiform bone",
                    "trapezium",
                    "trapezoid bone", 
                    "capitate bone", 
                    "hamate bone", 
                    "Metacarpus (palm) bones",
                    "metacarpal bones",
                    "Digits of the hands", 
                    "proximal phalanges",
                    "intermediate phalanges", 
                    "distal phalanges", 
                    "Pelvic Bones",
                    "hip bone", 
                    "Leg Bones",
                    "femur", 
                    "patella", 
                    "tibia",
                    "fibula", 
                    "Foot Bones", 
                    "Tarsal", 
                    "calcaneus", 
                    "talus", 
                    "navicular bone", 
                    "medial cuneiform bone", 
                    "intermediate cuneiform bone", 
                    "lateral cuneiform bone", 
                    "cuboid bone", 
                    "Metatarsus bones",
                    "metatarsal bone", 
                    "Digits of the feet", 
                    "proximal phalanges", 
                    "intermediate phalanges", 
                    "distal phalanges"]  
        if option in bodylist:
            validInput = True
        else:
             print "please type a body part"
    if debug:
        print "Option: ", option
    return option

def getFamily(prompt, debug = False):
    if debug:
        print "getFamily Function", prompt
    validInput = False
    while not validInput:
        option = raw_input(prompt)
        famlist = ["mom",
                   "dad",
                   "gradpa",
                   "grandma",
                   "grand mother",
                   "grand father",
                   "aunt",
                   "uncle",
                   "nephew",
                   "great grandmother",
                   "great grandfather"]
    if option in famlist:
        validInput = True
    else:
        print "please type a family name title"
    if debug:
        print "Option: ", option
    return option
    
def getColor(prompt, debug = False):
    if debug:
        print "getColor Function", prompt
    validInput = False
    while not validInput:
        option = raw_input(prompt)
        colorlist = ["red",
                   "organge",
                   "green",
                   "purple",
                   "pink",
                   "silver",
                   "blue",
                   "gray",
                   "white"]
        if option in colorlist:
                validInput = True
        else:
             print "please type a color"
    if debug:
        print "Option: ", option
    return option   
               
def getActivity(prompt, debug = False):
    if debug:
        print "getActivity Function", prompt
    validInput = False
    while not validInput:
        option = raw_input(prompt)
        actlist = ["dance",
                   "sing",
                   "frolick",
                   "draw",
                   "write",
                   "fanticies",
                   "arboatics",
                   "twerk",
                   "pole dance",
                   "day dream",
                   "shop",
                   "cry",
                   "wimper",
                   "be perty",
                   "listen to music",
                   "be awesome",
                   "play video games"]
        if option in actlist:
                validInput = True
        else:
            print "please type an activity"
    if debug:
        print "Option: ", option
    return option              
                   
                   
                   
                   
def getNumber(prompt, debug = False):
    if debug:
        print "getNumber Function", prompt
    validInput = False
    while not validInput:
        option = raw_input(prompt)
        allowedChars = "1234567890."
        validInput = True
        for letter in option:
            if debug:
                print letter
            if not(letter in allowedChars):
                validInput = False
        if not validInput:
            print "please type a number"
    if debug:
        print "Option: ", option
    return option

def getBuilding(prompt, debug = False):
    if debug:
        print "getBuilding Function", prompt
    validInput = False
    while not validInput:
        option = raw_input(prompt)
        buildinglist = ["house",
                        "skyscraper",
                        "school",
                        "barn",
                        "shed",
                        "office building",
                        "mall",
                        "strip mall",
                        "mill",
                        "factory",
                        "sewage plant",
                        "nuclear power plant",
                        "howl's moving caslte",
                        "guild",
                        "guild hall",
                        "tree hill",
                        "tree house",
                        "cave",
                        "waffle house",
                        "car dealership"]
        if option in buildinglist:
            validInput = True
        else:
            print "please type a building"
    if debug:
        print "Option: ", option
    return option
                    
            
def isSwear(word, debug = False):
    if debug: 
        print "In isSwear Function", word
    swearList = ["jerk",
                 "poopy",
                 "poopy head"]
    if word.lower() in swearList:
        return True
    else:
        return False
        




